<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      xmlns:permission="http://111.67.194.242/permission"
>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="referrer" content="same-origin"/>
  <title layout:title-pattern="$CONTENT_TITLE">主页</title>
  <link rel="stylesheet" href="/frame/css/font-awesome_4.7.0.min.css">
  <link rel="stylesheet" type="text/css" href="/frame/css/frame.css">
  <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
  <script src="/frame/js/jquery.rotate.min.js"></script>
  <script src="/js/Util.js"></script>
  <script src="/js/common.js"></script>
</head>
<body class="pc">
<link rel="stylesheet" type="text/css" th:if="${config.css != null && config.css.trim() != ''}" th:href="${config.css}">

<div class="frame_content">
  <div class="frame_background"></div>
  <div class="frame_inner_content" layout:fragment="content"></div>
</div>

<div class="frame_right_bar">
  <div class="frame_toolsBar">
    <div class="frame_toolsBar_top" layout:fragment="toolbar">
    </div>
    <div class="frame_toolsBar_bottom">
      <a  href="/" title="主页" ><i class="frame_jfa fa fa-home"></i></a>
      <a permission:login="false" href="/login" title="登录" ><i class="frame_jfa fa fa-user-circle"></i></a>
      <a permission:login href="/user/logout" title="退出登录" ><i class="frame_jfa fa fa-sign-out"></i></a>
    </div>
  </div>
</div>
<div class="frame_toolsBar_win">
  <iframe src="javascript:void(0);"></iframe>
</div>

<div style="display: none;"  layout:fragment="script"></div>
<script type="text/javascript">
  $(document.body).css("height", (window.innerHeight) + "px");
  $(".frame_toolsBar_top").delegate("a", "click", (e) => {
    e.preventDefault();
    var active = $(".frame_active_tool");
    var a = $(e.target).parent("a");
    var type = a.attr("type");
    if (type == "event") {
      return;
    }
    active.removeClass("frame_active_tool");
    if (a.children("i").is(active)) {
      $(".frame_toolsBar_win").fadeOut(200);
      return;
    }
    a.children("i").addClass("frame_active_tool");
    var href = a.attr("href");
    $(".frame_toolsBar_win iframe").attr("src", href);
    $(".frame_toolsBar_win").fadeIn(200);
  });
</script>
<script type="text/javascript" th:if="${config.js != null && config.js.trim() != ''}" th:src="${config.js}"></script>
</body>
</html>